<%@ page language="java" contentType="text/html; charset=UTF-8"
	import="com.icss.utils.RecordSet" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>学习心得</title>





<link type="text/css" rel="stylesheet" href="<%=basePath%>css/xinde.css">
<script type="text/javascript" src="<%=basePath%>js/deleteConfirm.js"></script>
<script type="text/javascript" src="<%=basePath%>js/jquery-1.4.2.min.js"></script>
<script type="text/javascript"
	src="<%=basePath%>js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=basePath%>js/xinde.js"></script>
<script type="text/javascript">
			function selectAll() {
			
				if ($("#all").attr('checked') == true) {
					$("input[name='appercetionIds']").attr("checked", true);
				} else {
					$("input[name='appercetionIds']").attr("checked", false);
				}
			
			}
			
			function submitConfirm() {
				var checkedBoxes = $("input:checked");
				if (checkedBoxes.length == 0) {
					alert('你没有选择任何要删除的标题！');
				} else {
					if (confirm('你确定要批量删除吗？')) {
						document.batchDelete.submit();
					}
				
				}
			}
		
		</script>
</head>
<body>
<form action="appercetion?action=admin_list" method="post">
<div><input type="text" name="typeArg"> 搜索条件： <select
	name="type">
	<option value="byName">姓名</option>
	<option value="byDate">时间</option>
</select> <input type="submit" value="搜索"></div>
</form>
<div class="container">
<table cellpadding="0" cellspacing="0" border="0" width="100%">

	<tr>
		<td>
		<div class="header">
		<div class="header_left">心得列表</div>
		<div class="header_right"><input type="checkbox" id="all"
			onclick="selectAll()"> 全选</a>&nbsp;&nbsp; <a
			href="javascript:submitConfirm();">删除选中</a></div>
		</div>
		</td>
	</tr>

	<tr>
		<td><c:choose>
			<c:when test="${empty requestScope.admin_list}">
				<font color="red">搜索不到数据</font>
			</c:when>
			<c:otherwise>
				<form method="post"
					action="appercetion?action=batchingDelete&role=officeAdmin"
					name="batchDelete"><c:forEach
					items="${requestScope.admin_list}" var="vo" varStatus="status">

					<div ondblclick="getAppercetionBodyById(${vo.APPERCETIONID})">
					<div class="title">

					<div class="header_left"><input type="checkbox"
						name="appercetionIds" value="${vo.APPERCETIONID }">
					${vo.APPERCETIONTITLE}</div>
					<div class="header_right"><a
						href="javascript:getAppercetionBodyById(${vo.APPERCETIONID})">↓查看/收起全文↓</a>
					</div>

					</div>
					<div class="date" id="date${vo.APPERCETIONID}">
					发表时间：${vo.PUBLISHTIME }&nbsp;&nbsp;作者：${vo.PUBLISHER }</div>
					<div class="opt"><a
						href="<%=basePath%>page/xinde/update.jsp?appercetionID=${vo.APPERCETIONID }&role=officeAdmin">编辑</a>|
					<a
						href="javascript:deleteXinde(${vo.APPERCETIONID },'officeAdmin')">删除</a>|

					<c:choose>
						<c:when test="${vo.ISPUBLIC}">
							<a
								href="appercetion?action=setPublic&visiable=0&appercetionID=${vo.APPERCETIONID }&role=officeAdmin">设置为不公开</a>
						</c:when>

						<c:otherwise>
							<a
								href="appercetion?action=setPublic&visiable=1&appercetionID=${vo.APPERCETIONID }&role=officeAdmin">设置为公开</a>
						</c:otherwise>
					</c:choose></div>


					<c:choose>
						<c:when test="${status.last == false}">

							<div class="line"></div>

						</c:when>

					</c:choose></div>

				</c:forEach></form>
			</c:otherwise>
		</c:choose></td>
	</tr>
</table>
</div>


<c:if test="${empty requestScope.admin_list == false}">
	<div style="margin-top: 10px">
	<%
				RecordSet rs = (RecordSet) request.getAttribute("admin_list");
				%> <a
		href="appercetion?action=admin_list&currentPage=<%=rs.currentPage - 1%>">上一页</a>
	<font color="red"><%=rs.currentPage%> </font>/ <%=rs.totalPage%> <a
		href="appercetion?action=admin_list&currentPage=<%=rs.currentPage + 1%>">下一页</a>
	</div>
</c:if>
</body>


</html>
